﻿@model DAL.Order
@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>OrderDetlEdit</title>
    <link href="~/lib/layui/css/layui.css" rel="stylesheet" />
    <script src="~/lib/layui/layui.js"></script>
    <script src="~/js/jquery.min.js"></script>
</head>
<body>
    <form class="layui-form" action="/Customer/OrderDetlEdit" method="post" id="Addfm">
        <input type="hidden" name="OrderId" value="@Model.OrderId" class="layui-input">
        <div class="layui-form-item">
            <label class="layui-form-label">下单手机号</label>
            <div class="layui-input-inline">
                <input type="text" name="Phone" required lay-verify="required" value="@Model.Phone" placeholder="请输入用户名" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">昵称</label>
            <div class="layui-input-inline">
                <input type="text" name="KeHuName" required lay-verify="required" value="@Model.KeHuName" placeholder="请输入用户名" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">收货地址</label>
            <div class="layui-input-inline">
                <input type="text" name="Address" required lay-verify="required" value="@Model.Address" placeholder="" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item" hidden="hidden">
            <label class="layui-form-label">昵称</label>
            <div class="layui-input-inline">
                <input type="text" name="CustomerId" required lay-verify="required" value="@Model.CustomerId" placeholder="请输入用户名" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item" hidden="hidden">
            <label class="layui-form-label">昵称</label>
            <div class="layui-input-inline">
                <input type="text" name="FaHuoZhuangTai" required lay-verify="required" value="@Model.FaHuoZhuangTai" placeholder="请输入用户名" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item" hidden="hidden">
            <label class="layui-form-label">昵称</label>
            <div class="layui-input-inline">
                <input type="text" name="ZhiFuZhuangTai" required lay-verify="required" value="@Model.ZhiFuZhuangTai" placeholder="请输入用户名" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item" hidden="hidden">
            <label class="layui-form-label">昵称</label>
            <div class="layui-input-inline">
                <input type="text" name="OrderBianHao" required lay-verify="required" value="@Model.OrderBianHao" placeholder="请输入用户名" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </div>
    </form>
    <script>
        layui.use(['form', 'layer', 'upload'], function () {
            $ = layui.jquery;
            var form = layui.form,
                layer = layui.layer;
            form.on('submit(formDemo)', function (data) {
                $.post("/Customer/OrderDetlEdit", $("#Addfm").serialize(), function (res) {
                    if (res.success) {
                        layer.msg("修改成功", function () {
                            var index = parent.layer.getFrameIndex(window.name);
                            parent.layer.close(index);
                            window.parent.location.reload();
                        });
                    }
                    else {
                        layer.alert("修改失败" + res.message, { icon: 5 });
                    }
                }, "json");
                return false;//不在进行传统提交
            });

        });
    </script>
</body>
</html>
